function loadFormData(form, data) {
	for (var key in data) {
		var value = data[key];
		var tag = form[key];
		if (tag instanceof NodeList) { // checkbox / radio
			if(tag[0].tagName == 'INPUT') {
                if(tag[0].type == 'checkbox') {
                    var vs = [];
                    vs = vs.concat(value);
                    Array.from(tag).filter(el => vs.indexOf(el.value) >= 0).map(el => {
                        el.checked = true;
                    });
                } else if(tag[0].type == 'radio') {
                    console.log('input radio', tag.value);
                    tag.value = value;
                }
            }
		} else {
			tag.value = value;
		}
	}
}